progame once
#pragma once
#include "RBTree.h"
namespace my_map {
	template<class K, class V>
	class map {
		struct MapOfValue {
			const K& operator()(const pair<const K, V>& value)
			{
				return value.first;
			}
		};
	public:
		typedef typename RBTree<K, pair<const K, V>, MapOfValue>::iterator iterator;
		iterator begin()
		{
			return _t.begin();
		}

		iterator end()
		{
			return _t.end();
		}
		bool insert(const pair<const K,V>& value)
		{
			return _t.Insert(value);
		}

	private:
		RBTree<K, pair<const K, V>, MapOfValue> _t;

	};


	void testmap()
	{
		map<int,int> m;
		int a[] = { 4,2,6,1,3,5,15,7,16,14 };
		for (auto& e : a)
		{
			m.insert(make_pair(e,e));
		}
		
	}

}